Decision step
The Decision step routes documents based on a true/false comparison of two values. Those values can be anything from field values in the current document (profile elements), static values, results of a database, an application query, and more.
The Decision step's logic is executed once for each document that reaches the step. This means that if a document contains multiple records (for example, a batch file) or the Decision step's logic needs to be applied to a "detail" level field (for example, item codes on each order line), you must split the document before the Decision step.
At execution time, "True" documents are processed to completion before the "false" documents are processed. This is important to understand if processing on the False path depends on something processed on the True path. For example, in a sales order synchronization process, first you may want to check whether the customer already exists and if it does not, create a new customer before inserting the sales order.
Here are some common uses of the Decision step.
-
Checking for the existence of a record in the destination system to determine whether to create or update it.
-
Database — The first value is the result of a SQL statement (often a simple
SELECT COUNT(1) FROM SOME_TABLE WHERE ID=?), the comparison is "Equal to", and the second value is a static value of '1'. -
Application — The first value is a profile element from a connector call response profile, the comparison is "Not equal to", and the second value is a static value of ' '.
-
Checking for the existence of value in a given profile element.
-
The first value is a profile element, the comparison is "Not equal to", and the second value is a static value of ' '.
Null values from a profile element or connector call are treated as empty strings (' ') for comparison. To compare against a null value in the inbound data, leave the Static Value setting in the Second Value field of the Decision step empty.
Decision step example
In this example, a process is able to receive orders only from a specific company, Company A. The Decision step determines whether the document was sent by Company A. If this is true, then the data from the company can continue processing. If this is false, then the document goes to a Stop step and halts processing for that particular instance.

Adding Decision step to process
Add a Decision step to a process to route documents based on a true/false comparison of two values.
-
Drag the Decision step onto the process canvas.
The Decision Properties dialog opens.
-
On the General tab, in the Display Name field, enter the name to describe the step. If you do not specify a display name, the step will not have a label. It is recommended to phrase the name as a question that the decision will answer, such as "Does Order Exist?"
-
In the First Value field, select the type of value from the Parameter Values dialog to be compared.
Depending on the type of parameter that you select, you may have to enter more data. Refer to the Parameter values topic for more information.
-
In the Comparison field, select one of the following comparison operators: Equal To, Not Equal To, Greater Than, Greater Than or Equal To, Less Than, Less Than or Equal To, Matches Java Regular Expression, Matches Wildcards.
- Use Matches Wildcards to match a value on a single line input.
- Use Matches Regular Expression to match a value in a multi-line input.
- Wildcards and regular expressions are valid only in the Second Value field of a comparison; if entered in the First Value field, they are ignored.
- An asterisk (*) is used with Matches Wildcards as a wildcard to match one or more occurrences of any character.
- A question mark (?) is used to match a single occurrence of any character.
- Use Matches Wildcards to match a value on a single line input.
-
In the Second Value field, select the type value from the Parameter Values dialog to be compared.
Depending on the type of parameter that you select, you may have to enter more data.
-
On the Notes tab,
- Enter the title of the note in the Title field.
- Enter the note in the Note field.
-
Click OK to save or click Cancel to cancel configuring the step.
-
In the process, connect the True and False paths to the appropriate next steps.